/*******************************************************************************
 * Copyright 2011 @ Kapil Viren Ahuja
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/
package com.kapilvirenahuja.eamsteps.datareader;

/**
 * Interface to access a cell.
 * 
 */
public interface IDataCell
{
    /**
     * Returns the type of the data in the cell. These could be a String, Long, Boolean or a reference.
     * 
     */
    String getType();

    /**
     * Gets the value of the object.
     *  
     */
    Object getValue();
    
    
    /**
     * <p>
     * Gets the long value of the cell only if the type of the cell is {@link Long}.
     * </p>
     * 
     * <p>
     * If the type of the cell is not {@link Long} this method will throw a {@link ClassCastException}.
     * </p>
     * 
     */
    Long getLongValue();
    
    
    /**
     * <p>
     * Gets the long value of the cell only if the type of the cell is {@link String}.
     * </p>
     * 
     * <p>
     * If the type of the cell is not {@link String} this method will throw a {@link ClassCastException}.
     * </p>
     * 
     */
    String getStringValue();

    
    /**
     * <p>
     * Gets the long value of the cell only if the type of the cell is {@link Boolean}.
     * </p>
     * 
     * <p>
     * If the type of the cell is not {@link Boolean} this method will throw a {@link ClassCastException}.
     * </p>
     * 
     */
    Boolean getBooleanValue();
}
